<template>
    <div class="header">
       <div @click="test">header 组件 {{ title }}</div>
    </div>
</template>
  
<script>
import { ref, onMounted, reactive, toRefs, computed, watch } from 'vue';
export default {
    emits: ['fas'],
    props: {
        title: {
            type: String,
            default: "默认"
        }
    },
    setup(props,{ emit }) { 

        let test = () => {
            emit("fas", "ddddd")
        }

        onMounted(() => {
            console.log(props.title);
        })

        return {
            test
        }
    }
}
</script>


  